﻿CREATE TRIGGER UserMessages_Tracking_Delete
ON [dbo].[UserMessages] 
AFTER delete
AS 
BEGIN
	UPDATE Sync.UserMessages_Tracking 
	SET LastUpdatedDate  = getdate(),
		IsDeleted = 1
	FROM Sync.UserMessages_Tracking s JOIN DELETED i
    ON s.UserMessageID = i.UserMessageID
END





